Optimal. Leaf size=82 \[ \frac {x}{a+b}+\frac {b^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2} (a+b) d}-\frac {(a-b) \coth (c+d x)}{a^2 d}-\frac {\coth ^3(c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 491, 597,
536, 212, 211} \begin {gather*} \frac {b^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2} d (a+b)}-\frac {(a-b) \coth (c+d x)}{a^2 d}+\frac {x}{a+b}-\frac {\coth ^3(c+d x)}{3 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 212
Rule 491
Rule 536
Rule 597
Rule 3751
Rubi steps
\begin {align*} \int \frac {\coth ^4(c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=-\frac {\coth ^3(c+d x)}{3 a d}+\frac {\text {Subst}\left (\int \frac {3 (a-b)+3 b x^2}{x^2 \left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{3 a d}\\ &=-\frac {(a-b) \coth (c+d x)}{a^2 d}-\frac {\coth ^3(c+d x)}{3 a d}-\frac {\text {Subst}\left (\int \frac {-3 \left (a^2-a b+b^2\right )-3 (a-b) b x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{3 a^2 d}\\ &=-\frac {(a-b) \coth (c+d x)}{a^2 d}-\frac {\coth ^3(c+d x)}{3 a d}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{(a+b) d}+\frac {b^3 \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tanh (c+d x)\right )}{a^2 (a+b) d}\\ &=\frac {x}{a+b}+\frac {b^{5/2} \tan ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2} (a+b) d}-\frac {(a-b) \coth (c+d x)}{a^2 d}-\frac {\coth ^3(c+d x)}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.49, size = 91, normalized size = 1.11 \begin {gather*} \frac {\frac {6 \left (c+d x+\frac {b^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2}}\right )}{a+b}-\frac {(-2 a+3 b+(4 a-3 b) \cosh (2 (c+d x))) \coth (c+d x) \text {csch}^2(c+d x)}{a^2}}{6 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(287\) vs.
\(2(72)=144\).
time = 2.74, size = 288, normalized size = 3.51
method | result | size |
risch | \(\frac {x}{a +b}-\frac {2 \left (6 a \,{\mathrm e}^{4 d x +4 c}-3 b \,{\mathrm e}^{4 d x +4 c}-6 a \,{\mathrm e}^{2 d x +2 c}+6 b \,{\mathrm e}^{2 d x +2 c}+4 a -3 b \right )}{3 a^{2} d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{3}}+\frac {\sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right )}{2 a^{3} \left (a +b \right ) d}-\frac {\sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{2 a^{3} \left (a +b \right ) d}\) | \(190\) |
derivativedivides | \(\frac {-\frac {\frac {a \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+5 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-4 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a +b}-\frac {1}{24 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {5 a -4 b}{8 a^{2} \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 b^{3} \left (-\frac {\left (-a +\sqrt {b \left (a +b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}\right )}{2 a \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}+\frac {\left (a +\sqrt {b \left (a +b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{2 a \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{\left (a +b \right ) a}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a +b}}{d}\) | \(288\) |
default | \(\frac {-\frac {\frac {a \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+5 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-4 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a +b}-\frac {1}{24 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {5 a -4 b}{8 a^{2} \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 b^{3} \left (-\frac {\left (-a +\sqrt {b \left (a +b \right )}-b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}\right )}{2 a \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}-a -2 b \right ) a}}+\frac {\left (a +\sqrt {b \left (a +b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{2 a \sqrt {b \left (a +b \right )}\, \sqrt {\left (2 \sqrt {b \left (a +b \right )}+a +2 b \right ) a}}\right )}{\left (a +b \right ) a}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a +b}}{d}\) | \(288\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1038 vs.
\(2 (72) = 144\).
time = 0.62, size = 1038, normalized size = 12.66 \begin {gather*} -\frac {{\left (a b - b^{2}\right )} \log \left ({\left (a + b\right )} e^{\left (4 \, d x + 4 \, c\right )} + 2 \, {\left (a - b\right )} e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}{8 \, {\left (a^{3} + a^{2} b\right )} d} + \frac {{\left (a b - b^{2}\right )} \log \left (2 \, {\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + a + b\right )}{8 \, {\left (a^{3} + a^{2} b\right )} d} + \frac {{\left (a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{16 \, {\left (a^{3} + a^{2} b\right )} \sqrt {a b} d} - \frac {{\left (a^{2} b - 6 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{16 \, {\left (a^{3} + a^{2} b\right )} \sqrt {a b} d} - \frac {3 \, {\left (12 \, a - b\right )} e^{\left (4 \, d x + 4 \, c\right )} - 6 \, {\left (9 \, a - b\right )} e^{\left (2 \, d x + 2 \, c\right )} + 22 \, a - 3 \, b}{24 \, {\left (a^{2} e^{\left (6 \, d x + 6 \, c\right )} - 3 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 3 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - a^{2}\right )} d} - \frac {3 \, {\left (4 \, a - b\right )} e^{\left (4 \, d x + 4 \, c\right )} - 6 \, {\left (2 \, a - b\right )} e^{\left (2 \, d x + 2 \, c\right )} + 4 \, a - 3 \, b}{6 \, {\left (a^{2} e^{\left (6 \, d x + 6 \, c\right )} - 3 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 3 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - a^{2}\right )} d} - \frac {6 \, {\left (9 \, a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, {\left (12 \, a - b\right )} e^{\left (-4 \, d x - 4 \, c\right )} - 22 \, a + 3 \, b}{24 \, {\left (3 \, a^{2} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, a^{2} e^{\left (-4 \, d x - 4 \, c\right )} + a^{2} e^{\left (-6 \, d x - 6 \, c\right )} - a^{2}\right )} d} - \frac {6 \, {\left (2 \, a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, {\left (4 \, a - b\right )} e^{\left (-4 \, d x - 4 \, c\right )} - 4 \, a + 3 \, b}{6 \, {\left (3 \, a^{2} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, a^{2} e^{\left (-4 \, d x - 4 \, c\right )} + a^{2} e^{\left (-6 \, d x - 6 \, c\right )} - a^{2}\right )} d} + \frac {6 \, {\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, b e^{\left (-4 \, d x - 4 \, c\right )} - 2 \, a - 3 \, b}{4 \, {\left (3 \, a^{2} e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, a^{2} e^{\left (-4 \, d x - 4 \, c\right )} + a^{2} e^{\left (-6 \, d x - 6 \, c\right )} - a^{2}\right )} d} + \frac {b \log \left ({\left (a + b\right )} e^{\left (4 \, d x + 4 \, c\right )} + 2 \, {\left (a - b\right )} e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}{4 \, a^{2} d} - \frac {b \log \left (2 \, {\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + a + b\right )}{4 \, a^{2} d} + \frac {{\left (2 \, a - b\right )} \log \left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}{4 \, a^{2} d} - \frac {b \log \left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}{2 \, a^{2} d} - \frac {{\left (2 \, a - b\right )} \log \left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}{4 \, a^{2} d} + \frac {b \log \left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}{2 \, a^{2} d} - \frac {{\left (a b - b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{4 \, \sqrt {a b} a^{2} d} - \frac {3 \, {\left (a b + b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{8 \, \sqrt {a b} a^{2} d} + \frac {{\left (a b - b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{4 \, \sqrt {a b} a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1023 vs.
\(2 (72) = 144\).
time = 0.40, size = 2368, normalized size = 28.88 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\coth ^{4}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 147 vs.
\(2 (72) = 144\).
time = 0.46, size = 147, normalized size = 1.79 \begin {gather*} \frac {\frac {3 \, b^{3} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{{\left (a^{3} + a^{2} b\right )} \sqrt {a b}} + \frac {3 \, {\left (d x + c\right )}}{a + b} - \frac {2 \, {\left (6 \, a e^{\left (4 \, d x + 4 \, c\right )} - 3 \, b e^{\left (4 \, d x + 4 \, c\right )} - 6 \, a e^{\left (2 \, d x + 2 \, c\right )} + 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 4 \, a - 3 \, b\right )}}{a^{2} {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.61, size = 519, normalized size = 6.33 \begin {gather*} \frac {x}{a+b}+\frac {\mathrm {atan}\left (\left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\,\left (\frac {4\,b^3}{a^2\,d\,{\left (a+b\right )}^3\,\left (a^3+b\,a^2\right )\,\sqrt {b^5}}+\frac {\left (a^4\,d\,\sqrt {b^5}-a^2\,b^2\,d\,\sqrt {b^5}\right )\,\left (a-b\right )}{b^3\,{\left (a+b\right )}^2\,\left (a^3+b\,a^2\right )\,\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}\,\sqrt {a^5\,d^2\,{\left (a+b\right )}^2}}\right )+\frac {\left (a-b\right )\,\left (a^4\,d\,\sqrt {b^5}+2\,a^3\,b\,d\,\sqrt {b^5}+a^2\,b^2\,d\,\sqrt {b^5}\right )}{b^3\,{\left (a+b\right )}^2\,\left (a^3+b\,a^2\right )\,\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}\,\sqrt {a^5\,d^2\,{\left (a+b\right )}^2}}\right )\,\left (\frac {a^4\,\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}}{2}+a^3\,b\,\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}+\frac {a^2\,b^2\,\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}}{2}\right )\right )\,\sqrt {b^5}}{\sqrt {a^7\,d^2+2\,a^6\,b\,d^2+a^5\,b^2\,d^2}}-\frac {8}{3\,a\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}-3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}-1\right )}-\frac {4\,\left (a^2+b\,a\right )}{a^2\,d\,\left (a+b\right )\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {2\,\left (2\,a^2+a\,b-b^2\right )}{a^2\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )\,\left (a+b\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________